<template>
  <div class="img-window">
    <el-row>
      <el-col
        :span="datas.style === 2 ? 12 : datas.style === 3 ? 8 : datas.style === 4 ? 6 : 24"
        v-for="(item, index) in datas.list"
        :key="index"
      >
        <div :style="{ padding: datas.margin + 'px' }">
          <img v-if="item.image" class="w100" :src="item.image" />
          <img v-else class="w100" src="@/assets/images/empty-banner.png" />
        </div>
      </el-col>
    </el-row>
    <!-- 删除组件 -->
    <slot name="deles" />
  </div>
</template>
<script lang="ts" setup name="ImgWindow">
import { toRefs } from "vue";
const props = defineProps({
  datas: {
    type: Object
  }
});
const { datas } = toRefs(props);
</script>
